package fr.umlv.android.boggle.listener;

import fr.umlv.android.boggle.model.Letter;

public class LetterEvent {
	public static int LETTER_CHANGED = 0;

	private int type;
	private final Letter letter;
	
	public LetterEvent(Letter letter, int eventType) {
		if (letter == null) {
			throw new NullPointerException("Cannot raise LetterEvent for null Letter");
		}
		if (eventType != LETTER_CHANGED) {
			throw new IllegalArgumentException("Bad LetterEvent type: "	+ eventType);
		}
		this.letter = letter;
		this.type = eventType;
	}
	
	public Letter getLetter() {
		return letter;
	}

	public int getEventType() {
		return type;
	}	
}
